package org.example.hansp.collection_.set_;

import java.util.Comparator;
import java.util.TreeSet;
@SuppressWarnings({"all"})
public class TreeSet_ {
    public static void main(String[] args) {
        TreeSet treeSet = new TreeSet(new Comparator<Object>() {
            public int compare(Object o1, Object o2) {
                return o2.toString().compareTo(o1.toString());
            }
        });

        treeSet.add("Tom");
        treeSet.add("Tom");
        treeSet.add("Alias");
        treeSet.add("Jack");
        treeSet.add("Lim");
        System.out.println(treeSet);
    }
}
